import Process,os,time,  commands,sys
from threading import Timer
from Configuration import Configuration
def hello():
    print "hello, world"
def kill(pid):
    os.system("kill " + pid)

    Configuration.set("difficulty", "max_no_competitors", 7)
for i in xrange(6,11/1):
    #modify the configuration file of openttd.cfg [difficulty] ->max_no_competitors -> i
    Configuration.set("game_creation", "map_x", i)
    Configuration.set("game_creation", "map_y", i)
    if sys.platform == "win32":
        os.system("cygwin.bat") 
    else :
        os.system("~/software/openttd-1.0.4/bin/openttd -g&")
    Process.killOpenTTD()
